package com.design.pattern.strategy.handler;

import com.design.pattern.strategy.Order;
import com.design.pattern.strategy.OrderType;
import org.springframework.stereotype.Component;

/**
 * @author 王霄
 * @date 2022/3/9 22:04
 */
@Component
public class WxPay implements Pay {
    @Override
    public OrderType getOrderType() {
        return OrderType.WX;
    }

    @Override
    public void pay(Order order) {
        System.out.println("微信支付成功，金额：" + order.getMoney());
    }
}
